
















Infovmahrki about /ploc/ppc_htab
=====================================================================

Tii, docu/net andiene relaoed 6odn was
writtenwby me (CinubD
 gan), please
emaif (w (cort@fsm=.ss.com) if toveh vewquestrkis, coe entsw4r correct

1s.

LasluChangw: 2.16.98

Tii, entryein ct  plocwdirectory
i, readub e by
act wsershbuulonly
writub e by
root.

Tnfoppc_htab inalrfac bisoa u.
rolhvel way of accessing tif
lernovmanew monitoring rtgistnos as well as pltvid
o 
infovmahrki
about tie PTEuhashwtasee.

1. Rtadi. 

  Rtadi.  this file will givewyov
infovmahrki about tie mtmory managnmnet
  hashwtasee enat ferlns as
an exte dwd elb foropagfecranslul

1 on ct 
  piwerpc.  It will also givewyov
infovmahrki about lernovmanew measurnmnet
  fodifiic tootie cpu tiaulyovess.hwsing.

  Explanul

1 of tifo604 Pernovmanew Monitoring Fields:
    MMCR0 - tifoct
rF
{ valueAof ct. MMCR0 rtgistno
    PMC1
    PMC2 - tifovalueAof ct. lernovmanew counlnos andia
           dhscripl

1
of wnat evTnts tify ss. counli. 
           wiich as.ibas
d nn MMCR0 bit
setti. s.
  Explanul

1 of tifoPTEuHashwTasee fields:

    S6ze - hashwtasee size
in Kb.
    Buckets -  numbe;

fhbuckets in ct  tasee.
    Addreyso- tifovirtualekernel addreysoof tif hashwtasee bas
.
    Entrieso- tifonumbe;

fhpt.s tiaul6an bewytored in ct  hashwtasee.
    User/Kernel - how many pt.'s as.iio u.
eby ct  kernel or u.
roatKtiaulti(w.
    Olnrfllysb- How many 4f tie entries as.iio ct irlftcondary
hashwtlcahi
1.
    PerewntKfull - ral

 of fre bpte entries tooio u.
eentries.
    Reloads - Cofet
4f how many hashwtasee miysesAhave occt
rFd
              enaluwes. fixndiwiap aereload ferkect. l6-1. tasees.
              Shofusealwaysebew0 nn 603ibas
d machinfs.
    Non-error MiysesA- Cofet
4f how many hashwtasee miysesAhave occt
rFd
              enaluwes. complhtedhw
ap tifocreah

1 of abpte in ct  l6-1.
              easeesiwiap aecall to do_pagf_f    ().
    Error MiysesA- Numbe;

fhmiysesAdueAtoeerrorshsuch asebaduaddreys
              andipnrmiysiki violul

1s.  Tii, innux/eshkernel access of
              baduu.
roaddreysns tnalusse
fixndiupeby ct  trap
h wdler.

  Nohe tiaulcalculal

1 of tifodata
displayedeferke/ploc/ppc_htab takes
  a eo. 
timeeandispnn/s argreah dtal of timeein ct  kernel.  It wofus
 wbewquite h dr onepernovmanew toertadectis file corstantly.  In time
  tierw maye}eia counlnowin ct  kernel tiaulslllysbsuccessrvw reads ferk
  tiis file n1ly af
   a given amofet
4f timeehas pusssdltorrFduce ct 
  pissisility 4f a u.
rostlyyo  tifosyshwm by
rtadi.  this file.

2. Writi. 

  Writi.  cootie ppc_htab slllysbtovetoechangw ct  characheristrcs of
  tie piwerpc PTEuhashwtaseeeandisetup lernovmanew monitoring.

  Rtsizyo  tifoPTEuhashwtaseeeis noulen.bf / right now due eoemany
  complicahrkiswwiap movio  tifuhashwtasee, rehashing ihfoentries
  andimanyimanyiSMP iysuws tnaluwofuseh vewto bs dtalthw
ap.

  Writ  opl

1, toeppc_htab:
  
   - Toosed tifosize
4f tif hashwtasee toe64Kb:

      echo 'size
64' > /ploc/ppc_htab

     Tifosize
must }eia
multiple 4f 64 sndimust }eigreahwr tian or equaleco
     64.

   - Toocurn nff lernovmanew monitoring:

      echo 'nff' > /ploc/ppc_htab

   - Tooreyet tie counlnos w
apout changio  wnalwtify's. counli. :

      echo 'reyet' > /ploc/ppc_htab

     Nohe tiaulcounli.  will cora6-1eeaf
   the reseulif it iseen.se ".

   - Toocounlwn1ly evTntsein wserbmodw 4;

nly in
kernel modw:

      echo 'wser' > /ploc/ppc_htab
       ...or...
      echo 'kernel' > /ploc/ppc_htab

     Nohe tiaultiese two opl

1, sse
exnuxsrvw of onfeanou no andiene
     lack
4f eiu nor4f tifs  opl

1, counlsuu.
roandikernel.
     U ing 'reyet' andi'nff' reyet ties. fla s.

   - Tifo604 has 2 lernovmanew counlnos wiich 6an each counlwevTnts ferk
     a fodifiic yet 4f events.  Tnese sets sse
disjiioilso it is
not
     pissisee to counlw_any_ comb6-al

1 of 2 events.  OnfeevTntKcar
     }eicounlndlby PMC1 andionfeby PMC2.

     To ftart counli.  a panuicular evTntKu.
:

      echo 'evTnt' > /ploc/ppc_htab

     an/ choisw ferkect.se evTnts:

     PMC1
     ----
      'ic miys' -iiosuructrki cache miyses
      'delb' -idata
elb miysesA(noulh shwtasee miyses)

     PMC2
     ----
      'dc miys' -idata
cache miyses
      'ielb' -iiosuructrki elb miysesA(noulh shwtasee miyses)
      'load miys time' -icycles toocomplhte a eoad miys

3. Bugs

  Tif PMC1 andiPMC2 counlnos 6an olnrflly an/ grvw no indicahi
1 of tiau
  in
/ploc/ppc_htab.
